package model

import (
	"360-cinema/user-server/basic/config"
	"gorm.io/gorm"
)

type History struct {
	gorm.Model
	UserId   int `gorm:"type:int(11);comment:用户ID"`
	VideoId  int `gorm:"type:int(11);comment:视频ID"`
	DramaId  int `gorm:"type:int(11);comment:剧集ID"`
	Progress int `gorm:"type:int(11);comment:播放进度"`
}

func CreateHistory(h *History) error {

	return config.DB.Create(&h).Error
}
